<?php 
/**
 * 非分类列表页
 */
if(!defined('EMLOG_ROOT')) {exit('error!');} 
?>
        <section id="content">
          <section class="vbox">
            <section class="scrollable wrapper-lg">
              <div class="row">
                <div class="col-sm-9">
                  <div class="blog-post">
<?php doAction('index_loglist_top'); ?>

<?php 
if (!empty($logs)):
foreach($logs as $value): 
?>
                    
				  <div class="post-item">

                      <!--<div class="post-media">
                        <img src="<?php TingImage($value['content'], $value['logid']); ?>" class="img-full m-b" alt="<?php echo $value['log_title']; ?>">
                      </div>-->
				 
                      <div class="caption wrapper-lg">
                        <h4 class="post-title"><a href="<?php echo $value['log_url']; ?>"><?php echo $value['log_title']; ?></a></h4>
                        <!--<div class="post-sum">
                          <p><?php echo nolog_style($value['log_description']); ?></p>
                        </div>-->
                        <div class="text-muted">
                          <i class="fa fa-user icon-muted"></i> by <a href="#" class="m-r-sm"><?php blog_author($value['author']); ?></a>&nbsp;&nbsp;
                          <i class="fa fa-clock-o icon-muted"></i> <?php echo gmdate('M d, Y', $value['date']); ?>
                          <a href="#" class="m-l-sm"><i class="fa fa-comment-o icon-muted"></i> <?php echo $value['comnum']; ?> comments</a>
                        </div>
                      </div>
					  </div>
                    
<?php 
endforeach;
else:
?>
	<h2>未找到</h2>
	<p>抱歉，没有符合您查询条件的结果。</p>
<?php endif;?>
                  </div>
				  <?php if ($page_url):?>
				  <div class="text-center m-t-lg m-b-lg">
                    <ul class="pagination pagination-md">
                      <?php 
					  $page_loglist = my_page($lognum, $index_lognum, $page, $pageurl); 
					  echo $page_loglist; 
					  ?>
                    </ul>
                  </div>
				  <?php endif;?>
				</div>
                <div class="col-sm-3">
                  <h5 class="font-bold">Categories</h5>
                  <ul class="list-group">
				  <?php global $CACHE; 
				  $sort_cache = $CACHE->readCache('sort'); 
				  foreach($sort_cache as $value): 
				  if ($value['pid'] != 0) continue; 
				  ?>
                    <li class="list-group-item">
                      <a href="<?php echo Url::sort($value['sid']); ?>">
                        <span class="badge pull-right"><!--<?php echo $value['lognum'] ?>--></span>
                        <?php echo $value['sortname']; ?>
                      </a>
					  <?php if (!empty($value['children'])): 
					  $children = $value['children']; 
					  foreach ($children as $key): 
					  $value = $sort_cache[$key];?>
					  <li class="list-group-item">
					  <a href="<?php echo Url::sort($value['sid']); ?>">
                        <span class="badge pull-right"><?php echo $value['lognum'] ?></span>
                        <?php echo $value['sortname']; ?>
                      </a>
					  </li>
					  <?php endforeach; ?>
					  <?php endif; ?>
                    </li>
					<?php endforeach; ?>
                  </ul>
                  <div class="tags m-b-lg l-h-2x">
				  <?php global $CACHE; 
				  $tag_cache = $CACHE->readCache('tags');?>
				  <?php foreach($tag_cache as $value): ?>
                    <a href="<?php echo Url::tag($value['tagurl']); ?>" title="<?php echo $value['usenum']; ?>" class="label bg-primary">
					<?php echo $value['tagname']; ?></a>&nbsp;&nbsp;
				  <?php endforeach; ?>
                  </div>
                  <h5 class="font-bold"></h5>
                  <div>
                   <?php side_log('0','8','date'); ?>
                  </div>
                </div>
              </div>
            </section>
          </section>
          <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen,open" data-target="#nav,html"></a>
        </section>
      </section>
    </section>    
  </section>
<?php include View::getView('footer');?>